<!DOCTYPE html>
<html>
<head>
    <title>退库记录</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16" style="margin: 8px 0px 0px 1px">
            <div class="search-group">
                <i-col span="3">
                    <i-input v-model="q.partName" @on-enter="query" placeholder="备件名称"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.spec" @on-enter="query" placeholder="备件规格"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.partCode" @on-enter="query" placeholder="备件编码"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.erpCode" @on-enter="query" placeholder="ERP编码"></i-input>
                </i-col>
                <i-col span="3">
                    <i-input v-model="q.producor" @on-enter="query" placeholder="供应厂商"></i-input>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>
        <Row :gutter="16" style="margin: 3px 0px 0px 0px;">
            <div class="buttons-group">
                #if($shiro.hasPermission("sparepartback:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("sparepartback:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("sparepartback:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="sparePartBack" :rules="ruleValidate" :label-width="80">
            <Row>
                <i-col span="11">
                    <Form-item label="出库单号" prop="outCode">
                        <i-input v-model="sparePartBack.outCode" placeholder="出库单号" readonly icon="md-arrow-dropdown-circle" @on-click="getSparePartOut"></i-input>
                    </Form-item>
                </i-col>

                <i-col span="11"offset="2">
                    <Form-item label="领用单位" prop="partUnit" >
                        <i-input v-model="sparePartBack.useUnit" placeholder="领用单位" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11" >
                    <!--<Form-item label="出库仓库ID" prop="outStoreId">
                        <i-input v-model="sparePartBack.outStoreId" placeholder="出库仓库ID"></i-input>
                    </Form-item>-->
                    <Form-item label="出库仓库" prop="outStore">
                        <i-input v-model="sparePartBack.outStore" placeholder="出库仓库" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="仓库位置" prop="postionName">
                        <i-input v-model="sparePartBack.postionName" placeholder="仓库位置" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="物料编码" prop="partCode">
                        <i-input v-model="sparePartBack.partCode" placeholder="物料编码" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="物料名称" prop="name">
                        <i-input v-model="sparePartBack.name" placeholder="名称" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="规格" prop="spec">
                        <i-input v-model="sparePartBack.spec" placeholder="规格" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="计量单位" prop="partUnit">
                        <i-input v-model="sparePartBack.partUnit" placeholder="计量单位" readonly></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="11">
                    <Form-item label="可退库数">
                        <i-input v-model="sparePartBack.relNum" placeholder="当前出库工单允许的最大退库数" readonly></i-input>
                    </Form-item>
                </i-col>
                <i-col span="11" offset="2">
                    <Form-item label="退库数" prop="backNum">
                        <i-input type="number" v-model="sparePartBack.backNum" placeholder="不得大于可退库数"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <Row>
                <i-col span="24">
                    <Form-item label="备注" prop="remark">
                        <i-input type="textarea" v-model="sparePartBack.remark" placeholder="备注"></i-input>
                    </Form-item>
                </i-col>
            </Row>
            <!--<Form-item label="审核时间" prop="checkDate">
                <i-input v-model="sparePartBack.checkDate" placeholder="审核时间"></i-input>
            </Form-item>
            <Form-item label="审核状态" prop="checkStatus">
                <i-input v-model="sparePartBack.checkStatus" placeholder="审核状态"></i-input>
            </Form-item>
            <Form-item label="审核人" prop="checkUser">
                <i-input v-model="sparePartBack.checkUser" placeholder="审核人"></i-input>
            </Form-item>
            <Form-item label="修改时间" prop="updateDate">
                <i-input v-model="sparePartBack.updateDate" placeholder="修改时间"></i-input>
            </Form-item>
            <Form-item label="修改人员" prop="updateUser">
                <i-input v-model="sparePartBack.updateUser" placeholder="修改人员"></i-input>
            </Form-item>
            <Form-item label="添加人员" prop="createUser">
                <i-input v-model="sparePartBack.createUser" placeholder="添加人员"></i-input>
            </Form-item>
            <Form-item label="添加时间" prop="createDate">
                <i-input v-model="sparePartBack.createDate" placeholder="添加时间"></i-input>
            </Form-item>
            <Form-item label="删除标识" prop="delFlag">
                <i-input v-model="sparePartBack.delFlag" placeholder="删除标识"></i-input>
            </Form-item>-->
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px">返回</i-button>
                <i-button type="info" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/spare/sparepartback.js?_${date.systemTime}"></script>
</body>
</html>
